/**
 * Created by Administrator on 16-12-10.
 */
/*===========搜索关键�?===========*/
$(function(){
    $(".search-c-t").toggle(
        function(){
            $("#keyword").css({"display":"block"})
            $("#keyword ul li").click(
                function(){$(".search-c-t input").val($(this).html());
            })
        },
        function(){$("#keyword").css({"display":"none"})}
    )
})
/*======================*/
$(function(){

    $(".rotate").hover(
        function(){$(".roimg").css({"transform":"rotate(180deg)","animation":"roimg  1s liear"})},
        function(){$(".roimg").css({"transform":"rotate(0deg)"})}
    )
    $(".navright ul li").hover(
        function(){$(this).find("div:nth-child(2)").css({"display":"block"})},
        function(){$(this).find("div:nth-child(2)").css({"display":"none"})}
    )
    $(".support-fir").hover(
        function(){
            $(".biaozhu-a").css({"display":"none"});console.log(13)
            $(".biaozhu-b").css({"display":"none"});console.log(13)
        },
        function(){
            $(".biaozhu-a").css({"display":"block"});console.log(13)
            $(".biaozhu-b").css({"display":"block"});console.log(13)
        }
    )
    $(".support-sec").hover(
        function(){
            $(".biaozhu-a").css({"display":"none"});console.log(13)
            $(".biaozhu-b").css({"display":"none"});console.log(13)
        },
        function(){
            $(".biaozhu-a").css({"display":"block"});console.log(13)
            $(".biaozhu-b").css({"display":"block"});console.log(13)
        }
    )
    $(".nav-fir").hover(
        function(){
            $(".biaozhu-a").css({"display":"none"});console.log(13)
            $(".biaozhu-b").css({"display":"none"});console.log(13)
        },
        function(){
            $(".biaozhu-a").css({"display":"block"});console.log(13)
            $(".biaozhu-b").css({"display":"block"});console.log(13)
        }
    )
    $(".nav-sec").hover(
        function(){
            $(".biaozhu-a").css({"display":"none"});console.log(13)
            $(".biaozhu-b").css({"display":"none"});console.log(13)
        },
        function(){
            $(".biaozhu-a").css({"display":"block"});console.log(13)
            $(".biaozhu-b").css({"display":"block"});console.log(13)
        }
    )
})

/*======================品牌效果=====================*/
$(function(){
    /*-----------------多�?�按�?---------------------*/
    $(".biaozhu-a").click(function(){
        $(".brandsec").css({"display":"block"});
        $(".brand-serch").css({"display":"block"});
        $(".brand-content").css({"display":"block"});
        $(".brand-btn").css({"display":"block"});
        $(".brandfir").css({"display":"none"});
        $(".biaozhu").css({"display":"none"});
        $("#choose-a").css({"height":"328px","width":"1145px"});
        $("#choose-a dt").css({"height":"328px"});
        $("#choose-a dd").css({"height":"328px","width":"980px"})
    })
    /*------------------更多按钮--------------------*/
    $("#biaozhu-p1").toggle(
        function(){
        $(".biaozhu").css({"display":"block"});
        $(".biaozhu").css({"top":"10px","right":"10px"});
        $(".biaozhu-b p:nth-child(1)").html("收起 ∧");
        $(".brandfir").css({"display":"none"});
        $(".brandsec").css({"display":"block"});
        $(".brand-serch").css({"display":"block"});
        $(".brand-content").css({"display":"block"});
        $(".brand-btn").css({"display":"none"});
        $("#choose-a").css({"height":"328px","width":"1145px"});
        $("#choose-a dt").css({"height":"328px"});
        $("#choose-a dd").css({"height":"328px","width":"980px"})
    },
    function(){
        $("biaozhu-p1").css({"display":"block"});
        $(".brandsec").css({"display":"none"});
        $(".brandfir").css({"display":"block"});
        $(".biaozhu").css({"display":"block"});
        $("#choose-a").css({"height":"122px"});
        $("#choose-a dt").css({"height":"122px"});
        $("#choose-a dd").css({"height":"122px"})
    }
    )
    /*-----------------取消按钮---------------------*/
    $(".bra-btn2").click(function(){
        $(".brandsec").css({"display":"none"});
        $(".brandfir").css({"display":"block"});
        $(".biaozhu").css({"display":"block"});
        $("#choose-a").css({"height":"122px"});
        $("#choose-a dt").css({"height":"122px"});
        $("#choose-a dd").css({"height":"122px"})
    })
    /*--------搜索框效--------*/
    $("#inp").click(function(){
        $(this).attr({"placeholder":""});
        $(this).css({"border":"2px solid #A5C7FE"})
    })
    /*$("#inp").siblings().click(function(){
        $("#inp").attr({"placeholder":" 搜索品牌名称"});
        $("#inp").css({"border":"none"})
    })*/
    /*—�?��?�多选时的状态�?��?��??*/
    //$("#maincontent span").click(function(){
    //    $(this).find(".cuored").css({"display":"block"});
    //    $(this).css({"border":"1px solid #EE0A3B"});
    //    $(".btnmarker").css({"display":"none"});
    //    $(".bra-btn1").css({"backgroundColor":"#EE0A3B","color":"#fff","border":"1px solid black"})
    //})
    $("#maincontent>span").toggle(
        function(){
            $(this).find(".cuored").css({"display":"block"});
            $(this).css({"border":"1px solid #EE0A3B"})
            $(".btnmarker").css({"display":"none"});
            $(".bra-btn1").css({"backgroundColor":"#EE0A3B","color":"#fff","border":"1px solid black"})
        },
        function(){
            $("#cuogreen").css({"display":"none"})
            $(this).find(".cuored").css({"display":"none"});
            $(this).css({"border":"1px solid #B0A59F"})
            $(".btnmarker").css({"display":"none"});
            //$(".bra-btn1").css({"backgroundColor":"#EE0A3B","color":"#fff","border":"1px solid black"})
        }
    )
    //$("#maincontent span").mouseleave(function(){
    //    $(this).find(".cuored").css({"display":"none"});
    //    $(this).find(".cuogreen").css({"display":"block"});
    //    $(this).css({"border":"1px solid #B0A59F"})
    //})
    $("#maincontent span .cuogreen").click(function(){
        $(".cuored").css({"display":"none"});
        $(".cuogreen").css({"display":"none"});
        $(this).css({"border":"1px solid #999999"})
    })
})
/*------------------选择收货城市--------------------*/
$(function(){
    $(".city span:nth-child(2)").click(function(){
        $(".choosecity").css("display","block")
    });
    $(".choosecity ul li").click(function(){
        $(".city span:nth-child(2)").html($(this).html())
        $(".choosecity").css("display","none")
    });
})
/*----------------------请输入价格--------------------*/
$(function(){
    $(".searchmore-money span input").focus(function(){
        $(".searchmore-money").css({"backgroundColor":"#EFECEB"});
        $(".sure").css("display","block");
        //$(this).removeAttr("placeholder")
        $(this).attr({"placeholder":""})
    });
    $(".searchmore-money span input").blur(
        function(){
            $(".sure").css({"display":"none"});
            $(".searchmore-money").css({"backgroundColor":"#fff"});
            $(this).attr({"placeholder":"￥请输入"})
    })
    $(".ready button:nth-child(1)").click(function(){
        $(".searchmore-money span input").val("")
    });
    $(".sure button:nth-child(2)").click(function(){
        $(".searchmore-money").css({"backgroundColor":"none"});
        $(".sure").css("display","none")
    })
    function fzy(){
        //setInterval(function(){
        //    clearInterval()
        //    $("#fzy .fzy_a .fzyy").css({"display":"block"});
        //    $("#fzy .fzy_a .fzzy").css({"display":"none"});
        //
        //},500)
        setInterval(function(){
            //clearInterval()
            //$("#fzy .fzy_a .fzzy").css({"display":"block"});
            //$("#fzy .fzy_a .fzyy").css({"display":"none"});

            //for (var i=0;i<=1;i++){
            //    $("#fzy .fzy_a .fzyy").eq(i).css({"display":"block"});
            //    $("#fzy .fzy_a .fzzy").eq(i).siblings().css({"display":"none"});
            //    i++
            //    if(i=1){
            //       var i=0
            //    }
            //}


        },500)

    }
    fzy()


    $("#cone ul li").hover(function(){
        $(this).css({"border": "4px solid red"})
    },function(){
        $(this).css({"border": "4px solid white"});
    })
    $("#cone ul li div").hover(function(){
        $(this).css({"border": "1px solid red"})
    },function(){
        $(this).css({"border": "1px solid #ccc"});
    })


})

